home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Development Tools & Languages / Windoid / MWindoid.cp < prev    next >
Encoding:
Text File  |  1993-01-18  |  1.3 KB  |  44 lines  |  [TEXT/MPS ]

  1. // MWindoid.cp
  2. // Copyright © 1991 by Apple Computer, Inc. All rights reserved.
  3.  
  4. #pragma once
  5.  
  6.  
  7. // INCLUDES ---------------------------------------------------------------------------
  8.  
  9. #include "UWindoid.h"
  10. #include "WindoidRez.h"
  11.  
  12.  
  13. // T H E   M A I N    P R O G R A M -----------------------------------------------------
  14.  
  15. #pragma processor 68000
  16. #pragma segment Main
  17.  
  18.  
  19. TWindoidApplication* gWindoidApplication;        // the application object 
  20.  
  21. void main()
  22. {
  23.     InitToolBox();                                // essential toolbox and utilities initialization
  24.  
  25.     if (ValidateConfiguration(gConfiguration))    // make sure we can run
  26.     {                                            // we made it! Continue with remainder of initialization 
  27.         InitUMacApp(8);                            // initialize MacApp; 8 calls to MoreMasters
  28.         InitUDialog();                            // initialize the TDialog view handling
  29.         InitUMenuView();                        // initialize the graphic menus unit
  30.         InitUFloatWindow();                        // initialize the float window unit
  31.         InitUPrinting();                        // initialize MacApp Printing
  32.  
  33.         // construct a new TWindoidApplication object, allocation errors are checked for.
  34.         gWindoidApplication = new TWindoidApplication;
  35.         gWindoidApplication->IWindoidApplication(kFileType, kSignature);
  36.  
  37.         gWindoidApplication->Run();             // run the application, when it's done - exit.
  38.     }
  39.     else
  40.         StdAlert(phUnsupportedConfiguration);
  41. }
  42.  
  43.  
  44.